翻訳と辞書
Words near each other
・ Uno's Garden
・ Uno, Arkansas
・ Uno, California
・ Uno, dos, ultraviolento
・ Uno, Kentucky
・ Uno, Virginia
・ Uno, West Virginia
・ UNO-96 Alliance
・ Uno-X
・ UnoAErre
・ Unoaku Anyadike
・ Unobe Station
・ Unobservable
・ Unobserved heterogeneity in duration models
・ Unobtainium
Unobtrusive JavaScript
・ Unobtrusive research
・ Unocal 76 Challenge
・ Unocal Corp. v. Mesa Petroleum Co.
・ Unocal Corporation
・ Unode
・ Unofficial badges of the United States military
・ Unofficial Bar
・ Unofficial Buffy the Vampire Slayer productions
・ Unofficial flags
・ Unofficial Football World Championships
・ Unofficial hearing
・ Unofficial magistrate
・ Unofficial Member
・ Unofficial mottos of Poland


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Unobtrusive JavaScript : ウィキペディア英語版
Unobtrusive JavaScript

Unobtrusive JavaScript is a general approach to the use of JavaScript in web pages. Though the term is not formally defined, its basic principles are generally understood to include:
* Separation of functionality (the "behavior layer") from a Web page's structure/content and presentation
* Best practices to avoid the problems of traditional JavaScript programming (such as browser inconsistencies and lack of scalability)
* Progressive enhancement to support user agents that may not support advanced JavaScript functionality
==A new paradigm==

JavaScript historically has had a reputation for being a clumsy language unsuitable for serious application development. This has been largely due to inconsistent implementations of the language itself and the Document Object Model (DOM) in various browsers, and the widespread use of buggy copy-and-paste code. Runtime errors were so common (and so difficult to debug) that few programmers even tried to fix them, as long as the script behaved more or less the way it was supposed to; scripts often failed completely in some browsers.
Some web developers have been promoting graceful degradation since 1994.〔
Aaron Gustafson.
("Understanding Progressive Enhancement" ).
2008.

The recent emergence of standards-compliant browsers, JavaScript frameworks and high-quality debugging tools have made organized, scalable JavaScript code possible, and the emergence of Ajax interfaces has made it desirable. Whereas JavaScript was once reserved for relatively simple and non-critical tasks such as form validation and decorative novelties, it is now being used to write large, complex codebases that are often part of a site's core functionality. Run time errors and unpredictable behavior are no longer minor annoyances; they are fatal flaws.
Advocates of unobtrusive JavaScript see it as part of the larger Web standards movement; much as the demand for cross-browser compatibility has driven the increasing emphasis on standardized markup and style, the increasing demand for rich Internet applications is driving the movement toward better practices with the use of JavaScript. The concept of ''unobtrusiveness'' in relation to JavaScript programming was coined in 2002 by Stuart Langridge〔(【引用サイトリンク】title= Building dynamic websites ) in the article "(Unobtrusive DHTML, and the power of unordered lists )". In the article Langridge argues for a way to keep all JavaScript code, including event handlers, outside of the HTML. Stuart Langridge has since expanded upon this thought in book〔 (Reference to the first edition, since it shows how the author pioneered the concept.)〕 and article format.〔E.g.: 〕
Other authors have tried to refine and define the essential elements of the unobtrusive paradigm. David Flanagan's seminal ''JavaScript: The Definitive Guide'' says that while there is no specific formula, there are three main goals:
# To separate JavaScript from HTML markup, as well as keeping modules of JavaScript independent of other modules.
# Unobtrusive JavaScript should degrade gracefully - all content should be available without all or any of the JavaScript running successfully.
# Unobtrusive JavaScript should not degrade the accessibility of the HTML, and ideally should improve it, whether the user has personal disabilities or are using an unusual, or unusually configured, browser.
The Web Standards Project describes four benefits of unobtrusive DOM scripting in their ''JavaScript Manifesto''.
# Usability: An unobtrusive DOM script does not draw the attention of the user - visitors use it without thinking about it.
# Graceful degradation: Unobtrusive DOM scripts never generate error messages, in any browser, even when they fail. If features cannot be presented properly, they silently disappear.
# Accessibility: If any script fails, the page still delivers its core functions and information via the markup, stylesheets and/or server-side scripting.
# Separation: For the benefit of other and future web developers, all JavaScript code is maintained separately, without impacting other files of script, markup or code.〔(【引用サイトリンク】 title=The JavaScript Manifesto )
For the Paris Web Conference in 2007, Christian Heilmann identified seven rules of Unobtrusive JavaScript.
# Do not make any assumptions: Defensive programming techniques should allow for the possibilities that JavaScript may not run, the browser may not support expected methods, the HTML may have changed, unexpected input devices may be in use and other scripts may either not be present or may be encroaching on the global namespace.
# Find your hooks and relationships, such as IDs and other aspects of the expected HTML.
# Leave traversing individual DOM objects to the experts, such as to the CSS handler built into the browser where possible.
# Understand browsers and users, particularly how they fail, what assumptions they make, and unusual configurations or usages.
# Understand events, including how they 'bubble' and the features of the Event object that is passed to most event handlers.
# Play well with other scripts by avoiding global function and variable names.
# Work for the next developer by using self-explanatory variable and function names, creating logical and readable code, making dependencies obvious, and commenting any code that still might confuse.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Unobtrusive JavaScript」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.